using UnityEngine;
using System.Collections;

public class CreateSoundWave : MonoBehaviour
{
    public GameObject soundWave;
    private PlayerControl player; 

    void Start()
    {
        this.player = GameControl.FindPlayer();
    }

    public void CreateSoundWaves()
    {
        Vector3 soundPosition = this.transform.position;
        soundPosition.y = 0; // Poner valor correcto de Y
        Instantiate(this.soundWave, soundPosition, Quaternion.Euler(90, 0, 0));

        player.audio.clip = player.bounceSound;
        player.audio.pitch = 1.5f;
        player.audio.PlayOneShot(player.bounceSound);
    }
}
